import React from "react";
// import Home from "../views/home/";
// import Trade from "../views/trade/";
// import Login from "../views/login";
import { Redirect } from "react-router-dom";

const HomePage = React.lazy(() => import("../views/home"));
const TradePage = React.lazy(() => import("../views/trade"));
const LoginPage = React.lazy(() => import("../views/login"));
const ResignPage = React.lazy(() => import("../views/resign"));
const routers = [
  {
    path: "/trade",
    exact: true,
    strict: true,
    key: "trade",
    component: TradePage,
    meta: {
      requiresAuth: false
    }
  },
  {
    path: "/login",
    exact: true,
    strict: true,
    key: "login",
    component: LoginPage,
    meta: {
      requiresAuth: false
    }
  },
  {
    path: "/resign",
    exact: true,
    strict: true,
    key: "login",
    component: ResignPage,
    meta: {
      requiresAuth: false
    }
  },
  {
    path: "/",
    exact: true,
    strict: true,
    key: "home",
    component: () => <Redirect to="/trade" />,
    meta: {
      requiresAuth: false
    }
  },
  {
    path: "/home",
    exact: true,
    strict: true,
    key: "home",
    component: HomePage,
    meta: {
      requiresAuth: false
    }
  }
];

export default routers;
